#pragma once
#include "IBaseObject.h"
#include "ObjectFactor.h"



class CBaseObject : public IBaseObject
{
	template<typename type>
	friend type* ConstructOjbect(TCHAR* OjbectName);

public:
	CBaseObject();
	virtual const UINT32 GetID() const { return mID; }
	virtual void SetName(const TCHAR* name);
	virtual const  String& GetName() const { return mName; }
	virtual const INT32 GetRefCount(){ return mRefCount; }
	virtual void AddRefCount(){ ++mRefCount; }
	virtual void Release();

private:
	virtual void SetID(UINT32);

private:
	UINT32 mID;
	INT32	mRefCount;
	String mName;
	String mResourceName;
};

